
#include "Computer.h"
#include "utils.h"

Computer::Computer(MonitorFactory* monitor_factory)
{
  utils::Assertnnull(monitor_factory, "参数monitor_factory不能为空");
  monitor_ = monitor_factory->GetMonitor();
}

std::string Computer::Desc()
{
  return "A computer that combines " + monitor_->Brand();
}

Computer::~Computer()
{
  delete monitor_;
  monitor_ = nullptr;
}
